package com;
//首尾元素交换
public class ThreeTest {
    public static void main(String[] args) {
        int[] nums = {23, 54, 64, 26};

        for (int i = 0; i < nums.length; i++) {
            //首尾元素交换
            int temp = nums[i];
            nums[i] = nums[nums.length - 1 - i];
            nums[nums.length - 1 - i] = temp;
        }
        for (int num : nums) {
            System.out.println(num);
        }
    }
}